//
//  UIColor+Extension.swift
//  HMWeibo12
//
//  Created by iOS on 16/9/22.
//  Copyright © 2016年 iOS. All rights reserved.
//

import UIKit

extension UIColor {
    // 计算型属性,提供get方法,里面不能存值
    class var random: UIColor {
        get {
            // 0 - 255
            let red = CGFloat(arc4random_uniform(256)) / 255.0
            let green = CGFloat(arc4random_uniform(256)) / 255.0
            let blue = CGFloat(arc4random_uniform(256)) / 255.0
            return UIColor(red: red, green: green, blue: blue, alpha: 1)
        }
    }
}
